package com.example.basic.base;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 站点相关配置属性
 *
 * @author tds
 */
@ConfigurationProperties(prefix = "lms")
public class SystemProperties {
    /**
     * 调试模式
     * 生产模式下不建议启动调试模式
     */
    private boolean debug = false;

    /**
     * 主域名
     */
    private String masterDomain = "";

    /**
     * 访问端口号
     */
    private String masterPort = "";

    /**
     * 应用根目录
     * 系统在启动的时候会读取配置文件获取
     */
    private String root = "";

    /**
     * 信任的单点登陆域名
     */
    private String authSsoTrustedDomain = "";

    /**
     * 多机构模式
     */
    private boolean multiOrgEnable = false;

    /**
     * 主键生成器的数据中心ID
     */
    private Long idWorkerDataCenterId = 1L;

    /**
     * 主键生成器的机器ID
     */
    private Long idWorkerWorkerId = 1L;

    /**
     * 是否启用读写分离
     */
    private boolean masterSlaveEnable = false;

    public boolean isDebug() {
        return debug;
    }

    public void setDebug(boolean debug) {
        this.debug = debug;
    }

    public String getMasterDomain() {
        return masterDomain;
    }

    public void setMasterDomain(String masterDomain) {
        this.masterDomain = masterDomain;
    }

    public String getMasterPort() {
        return masterPort;
    }

    public void setMasterPort(String masterPort) {
        this.masterPort = masterPort;
    }

    public String getRoot() {
        return root;
    }

    public void setRoot(String root) {
        this.root = root;
    }

    public String getAuthSsoTrustedDomain() {
        return authSsoTrustedDomain;
    }

    public void setAuthSsoTrustedDomain(String authSsoTrustedDomain) {
        this.authSsoTrustedDomain = authSsoTrustedDomain;
    }

    public boolean isMultiOrgEnable() {
        return multiOrgEnable;
    }

    public void setMultiOrgEnable(boolean multiOrgEnable) {
        this.multiOrgEnable = multiOrgEnable;
    }

    public Long getIdWorkerDataCenterId() {
        return idWorkerDataCenterId;
    }

    public void setIdWorkerDataCenterId(Long idWorkerDataCenterId) {
        this.idWorkerDataCenterId = idWorkerDataCenterId;
    }

    public Long getIdWorkerWorkerId() {
        return idWorkerWorkerId;
    }

    public void setIdWorkerWorkerId(Long idWorkerWorkerId) {
        this.idWorkerWorkerId = idWorkerWorkerId;
    }

    public boolean isMasterSlaveEnable() {
        return masterSlaveEnable;
    }

    public void setMasterSlaveEnable(boolean masterSlaveEnable) {
        this.masterSlaveEnable = masterSlaveEnable;
    }
}
